package com.itheima.a03runtimedemo;

import java.io.IOException;

public class RuntimeDemo1 {
    public static void main(String[] args) throws IOException {

        //获取cpu的线程数
        System.out.println(Runtime.getRuntime().availableProcessors());//32

        //总内存大小
        System.out.println(Runtime.getRuntime().totalMemory()/1024/1024);//1073741824

        //最大内存大小
        System.out.println(Runtime.getRuntime().maxMemory() /1024 /1024 );//2147483648

        //运行cmd命令
        System.out.println(Runtime.getRuntime().exec("notepad" ));
    }
}
